using IQIGame.Onigao.GamePlay;

namespace IQIGame.Onigao.Logic
{
    /// <summary>
    /// 电梯到达触发
    /// </summary>
    public class TrigElevatorArrive : BaseServiceTrigger
    {
        public override bool OnTrigger(LevelPlayer player, object dynamicParam, TrigValueTypeParam dynamicValueTypePram)
        {
            var config = _paramConfig as TrigParamElevatorArrive;
            int requireFloor = config.floor;
            int curFloor = dynamicValueTypePram.param1;

            if (requireFloor == -1 || curFloor == requireFloor)
            {
                return base.OnTrigger(player, dynamicParam, dynamicValueTypePram);
            }
            return false;
        }
    }
}
